//
//  XLHeadViewCell.m
//  XiangLove
//
//  Created by feng song on 2017/11/29.
//  Copyright © 2017年 BAOMIHUA.COM. All rights reserved.
//

#import "XLHeadViewCell.h"

@implementation XLHeadViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {

        [self settingUI];
    }
    return self;
}

-(void)settingUI
{
    self.headImgView = [[UIImageView alloc]init];
    _headImgView.backgroundColor = kWhiteColor;
    _headImgView.layer.masksToBounds = YES;
    _headImgView.layer.cornerRadius = 40;
    [_headImgView sd_setImageWithURL:nil placeholderImage:[UIImage imageNamed:@"datu"]];
    
    [self.contentView addSubview:_headImgView];
    [_headImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.right.equalTo(self.contentView.mas_right).offset(-5);
        make.size.mas_equalTo(CGSizeMake(80, 80));
        
    }];
    
    
    self.UserNameView = [[UILabel alloc]init];
    _UserNameView.font = [UIFont systemFontOfSize:29.0];
    _UserNameView.textColor = kBlackColor;
    [self.contentView addSubview:_UserNameView];
    [_UserNameView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView).with.offset(-12);
        make.left.equalTo(self.contentView.mas_left).with.offset(15);
         make.right.equalTo(self.headImgView.mas_left).with.offset(-5);
    }];
//    self.levelImage = [[UIImageView alloc]init];
//    
//    [self.contentView addSubview:_levelImage];
//    [_levelImage mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.equalTo(_UserNameView.mas_top).offset(4);
//        make.left.equalTo(_UserNameView.mas_right).offset(10);
//        make.size.mas_equalTo(CGSizeMake(32, 16));
//        
//    }];
    
    self.UsersIdView = [[UILabel alloc]init];
    _UsersIdView.font = [UIFont systemFontOfSize:14.0];
    _UsersIdView.textColor = RGB_HEX(0x9395a2);
    [self.contentView addSubview:_UsersIdView];
    [_UsersIdView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.UserNameView.mas_bottom).offset(10);
        make.left.equalTo(self.contentView.mas_left).offset(15);
        
    }];
    
    
    
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
